// 导入路由依赖
import { useRoutes } from "react-router-dom";
// 导入所需组件，首页  关于
import LoginView from "../views/login";
import LotteryView from "../views/cj/jp/index";
// 创建路由
const routes = [
    {
      path: "/",
      element: (<LoginView></LoginView>)
    },
    {
      path: "/lottery",
      element: (<LotteryView ></LotteryView >)
    },
  ];
  // 使用useRoutes 创建
export default function RouterView() {
    // 创建路由
    const elem = useRoutes(routes);
    // 返回接口
    return elem;
  }
  